<?php
$this->breadcrumbs = array(
    'Course Types' => array('admin'),
    'Manage',
);

$this->menu = array(
    //array('label'=>Yii::t('app', 'List') . ' ' . $model->label(2), 'url'=>array('index')),
    array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')),
);
?>

<h1>Manage Course Types</h1>


<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'aman-student-college-details-grid',
    'itemsCssClass' => 'table-bordered items',
    'dataProvider' => $model->search(),
    'columns' => array(
        array(
            'class' => 'editable.EditableColumn',
            'name' => 'course_name',
            'headerHtmlOptions' => array('style' => 'width: 110px'),
            'editable' => array(//editable section
                //'apply'      => '$data->state_name != 4', //can't edit deleted users
                'url' => $this->createUrl('amanCourseType/updateCourseDetails'),
                'placement' => 'right',
            )
        ),
        array(
            'class' => 'editable.EditableColumn',
            'name' => 'status',
            'headerHtmlOptions' => array('style' => 'width: 100px'),
            'editable' => array(
                'type' => 'select',
                'url' => $this->createUrl('amanCourseType/updateCourseDetails'),
                'placement' => 'right',
                'source' => $this->createUrl('amanCourseType/status'),
//onsave event handler
                'onSave' => 'js: function(e, params) {
console && console.log("saved value: "+params.newValue);
}',
            )
        ),
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
        ),
    ),
));
?>